package com.tan.lighting.disruptor.handler;


import com.tan.lighting.disruptor.Handler;
import com.tan.lighting.disruptor.event.CommandEvent;
import com.tan.lighting.nio.ByteBufferAble;

/**
 * Description:执行命令的业务逻辑
 * User: tan
 * DateTime: 2018/1/3 17:33
 */
public class ExcuteCommandHandlerCommand extends AbstractCommandEventHandler {
    @Override
    public void onEvent(CommandEvent event, long sequence, boolean endOfBatch) throws Exception {
        Handler handler = event.getHandler();
        if (handler != null) {
            ByteBufferAble cmdResult = handler.handle();
        }
    }
}
